package com.donovosoft.api;

import java.io.File;
import java.io.IOException;
import java.io.OutputStream;

import com.donovosoft.api.exceptions.AuthenticationException;
import com.donovosoft.api.exceptions.PathNotFound;

public abstract class NetSender implements Bean {

	/**
	 * 
	 */
	private static final long serialVersionUID = -6831273934584628919L;
	private int port;
	private String host;
	private String user;
	private String password;

	public int getPort() {
		return port;
	}

	public void setPort(int port) {
		this.port = port;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public abstract boolean login() throws AuthenticationException;

	public abstract void changeDir(String path) throws PathNotFound;

	public abstract String[] listFiles();

	public abstract boolean deleteFile(String name) throws IOException;

	public abstract boolean makeDir(String path);

	public abstract boolean deleteDir(String path);

	public abstract long getModificationTime(String path) throws PathNotFound;

	public abstract String currentDir();

	public abstract boolean putFile(File stream);

	public abstract OutputStream getFile(String name);

	public abstract boolean logout();

}
